Null Modem
   HOME

TheInfoList



OR:

Null modem is a communication method to directly connect two DTEs (
computer A computer is a machine that can be programmed to Execution (computing), carry out sequences of arithmetic or logical operations (computation) automatically. Modern digital electronic computers can perform generic sets of operations known as C ...
,
terminal Terminal may refer to: Computing Hardware * Terminal (electronics), a device for joining electrical circuits together * Terminal (telecommunication), a device communicating over a line * Computer terminal, a set of primary input and output devic ...
,
printer Printer may refer to: Technology * Printer (publishing), a person or a company * Printer (computing), a hardware device * Optical printer for motion picture films People * Nariman Printer (fl. c. 1940), Indian journalist and activist * James ...
, etc.) using an
RS-232 In telecommunications, RS-232 or Recommended Standard 232 is a standard originally introduced in 1960 for serial communication transmission of data. It formally defines signals connecting between a ''DTE'' (''data terminal equipment'') such a ...
serial cable A serial cable is a cable used to transfer information between two devices using a serial communication protocol. The form of connectors depends on the particular serial port used. A cable wired for connecting two DTEs directly is known as a null ...
. The name stems from the historical use of
RS-232 In telecommunications, RS-232 or Recommended Standard 232 is a standard originally introduced in 1960 for serial communication transmission of data. It formally defines signals connecting between a ''DTE'' (''data terminal equipment'') such a ...
cables to connect two
teleprinter A teleprinter (teletypewriter, teletype or TTY) is an electromechanical device that can be used to send and receive typed messages through various communications channels, in both point-to-point and point-to-multipoint configurations. Initia ...
devices or two
modem A modulator-demodulator or modem is a computer hardware device that converts data from a digital format into a format suitable for an analog transmission medium such as telephone or radio. A modem transmits data by Modulation#Digital modulati ...
s in order to communicate with one another; ''null modem'' communication refers to using a crossed-over RS-232 cable to connect the teleprinters directly to one another without the modems. It is also used to serially connect a computer to a printer, since both are DTE, and is known as a ''Printer Cable''. The RS-232 standard is asymmetric as to the definitions of the two ends of the communications link, assuming that one end is a DTE and the other is a DCE, e.g. a
modem A modulator-demodulator or modem is a computer hardware device that converts data from a digital format into a format suitable for an analog transmission medium such as telephone or radio. A modem transmits data by Modulation#Digital modulati ...
. With a null modem connection the
transmit Transmit is a file transfer client program for macOS. Developed by Panic, Transmit is shareware. After a seven-day trial period, the product can only be used for seven-minute sessions until it has been purchased. Originally built as an FTP client ...
and receive lines are crosslinked. Depending on the purpose, sometimes also one or more
handshake A handshake is a globally widespread, brief greeting or parting tradition in which two people grasp one of each other's like hands, in most cases accompanied by a brief up-and-down movement of the grasped hands. Customs surrounding handshakes a ...
lines are crosslinked. Several wiring layouts are in use because the null modem connection is not covered by the RS-232 standard.


Origins

Originally, the RS-232 standard was developed and used for
teleprinter A teleprinter (teletypewriter, teletype or TTY) is an electromechanical device that can be used to send and receive typed messages through various communications channels, in both point-to-point and point-to-multipoint configurations. Initia ...
machines which could communicate with each other over phone lines. Each teleprinter would be physically connected to its modem via an RS-232 connection and the modems could call each other to establish a remote connection between the teleprinters. If a user wished to connect two teleprinters directly without modems (null modem) then they would crosslink the connections. The term ''null modem'' may also refer to the cable or adapter itself as well as the connection method. Null modem cables were a popular method for transferring data between the early personal computers from the 1980s to the early 1990s.


Cables and adapters

A null modem cable is a RS-232 serial cable where the transmit and receive lines are crosslinked. In some cables there are also handshake lines crosslinked. In many situations a straight-through serial cable is used, together with a null modem
adapter An adapter or adaptor is a device that converts attributes of one electrical device or system to those of an otherwise incompatible device or system. Some modify power or signal attributes, while others merely adapt the physical form of one con ...
. The adapter contains the necessary crosslinks between the signals.


Wiring diagrams

Below is a very common wiring diagram for a null modem cable to interconnect two DTEs (e.g. two PCs) providing full handshaking, which works with software relying on proper assertion of the ''Data Carrier Detect'' (DCD) signal:


Applications

The original application of a null modem was to connect two teleprinter terminals directly without using modems. As the RS-232 standard was adopted by other types of equipment, designers needed to decide whether their devices would have DTE-like or DCE-like interfaces. When an application required that two DTEs (or two DCEs) needed to communicate with each other, then a null modem was necessary. Null modems were commonly used for
file transfer File transfer is the transmission of a computer file through a communication channel from one computer system to another. Typically, file transfer is mediated by a communications protocol. In the history of computing, numerous file transfer protocol ...
between computers, or remote operation. Under the
Microsoft Windows Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for serv ...
operating system An operating system (OS) is system software that manages computer hardware, software resources, and provides common services for computer programs. Time-sharing operating systems schedule tasks for efficient use of the system and may also in ...
, the
direct cable connection Direct Cable Connection (DCC) is a feature of Microsoft Windows that allows a computer to transfer and share files (or connected printers) with another computer, via a connection using either the serial port, parallel port or the infrared port ...
can be used over a null modem connection. The later versions of
MS-DOS MS-DOS ( ; acronym for Microsoft Disk Operating System, also known as Microsoft DOS) is an operating system for x86-based personal computers mostly developed by Microsoft. Collectively, MS-DOS, its rebranding as IBM PC DOS, and a few ope ...
were shipped with the
InterLnk This article presents a list of commands used by DOS operating systems, especially as used on x86-based IBM PC compatibles (PCs). Other DOS operating systems are not part of the scope of this list. In DOS, many standard system commands were pro ...
program. Both pieces of software allow the mapping of a
hard disk A hard disk drive (HDD), hard disk, hard drive, or fixed disk is an electro-mechanical data storage device that stores and retrieves digital data using magnetic storage with one or more rigid rapidly rotating platters coated with magnet ...
on one computer as a network drive on the other computer. No Ethernet hardware (such as a
network interface card A network interface controller (NIC, also known as a network interface card, network adapter, LAN adapter or physical network interface, and by similar terms) is a computer hardware component that connects a computer to a computer network. Ear ...
or a modem) is required for this. On the
Commodore Amiga Amiga is a family of personal computers introduced by Commodore in 1985. The original model is one of a number of mid-1980s computers with 16- or 32-bit processors, 256 KB or more of RAM, mouse-based GUIs, and significantly improved graphi ...
system, a null modem connection was a common way of playing multiplayer games between two machines. The popularity and availability of faster information exchange systems such as
Ethernet Ethernet () is a family of wired computer networking technologies commonly used in local area networks (LAN), metropolitan area networks (MAN) and wide area networks (WAN). It was commercially introduced in 1980 and first standardized in 198 ...
made the use of null modem cables less common. In modern systems, such a cable can still be useful for
kernel Kernel may refer to: Computing * Kernel (operating system), the central component of most operating systems * Kernel (image processing), a matrix used for image convolution * Compute kernel, in GPGPU programming * Kernel method, in machine learnin ...
mode development, since it allows the user to remotely debug a kernel with a minimum of device drivers and code (a serial driver mainly consists of two FIFO buffers and an
interrupt service routine In computer systems programming, an interrupt handler, also known as an interrupt service routine or ISR, is a special block of code associated with a specific interrupt condition. Interrupt handlers are initiated by hardware interrupts, softwar ...
).
KGDB KGDB is a debugger for the Linux kernel and the kernels of NetBSD and FreeBSD. It requires two machines that are connected via a serial connection. The serial connection may either be an RS-232 interface using a null modem cable, or via the UD ...
for
Linux Linux ( or ) is a family of open-source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically packaged as a Linux distribution, which ...
, ddb for
BSD The Berkeley Software Distribution or Berkeley Standard Distribution (BSD) is a discontinued operating system based on Research Unix, developed and distributed by the Computer Systems Research Group (CSRG) at the University of California, Berk ...
, and WinDbg or KD for Windows can be used to remotely debug systems, for example. This can also provide a serial console through which the in-kernel debugger can be dropped to in case of kernel panics, in which case the local monitor and keyboard may not be usable anymore (the
GUI The GUI ( "UI" by itself is still usually pronounced . or ), graphical user interface, is a form of user interface that allows users to interact with electronic devices through graphical icons and audio indicator such as primary notation, inste ...
reserves those resources and dropping to the debugger in the case of a panic won't free them). Another context where these cables can be useful is when administering "headless" devices providing a serial administration console (i.e. managed switches, rackmount server units, and various embedded systems). An example of embedded systems that widely use null modems for remote monitoring include RTUs, device controllers, and smart sensing devices. These devices tend to reside in close proximity and lend themselves to short run serial communication through protocols such as
DNP3 Distributed Network Protocol 3 (DNP3) is a set of communications protocols used between components in process automation systems. Its main use is in utilities such as electric and water companies. Usage in other industries is not common. It was ...
,
Modbus Modbus is a data communications protocol originally published by Modicon (now Schneider Electric) in 1979 for use with its programmable logic controllers (PLCs). Modbus has become a ''de facto'' standard communication protocol and is now a commonl ...
, and other IEC variants. The Electric, Oil, Gas, and Water Utilities are slow to respond to newer networking technologies which may be due to large investments in capital equipment that has useful service life measured in decades. Serial ports and null modem cables are still widely used in these industries with Ethernet just slowly becoming a widely available option.


Types of null modem

Connecting two DTE devices together requires a null modem that acts as a DCE between the devices by swapping the corresponding signals (TD-RD, DTR-DSR, and RTS-CTS). This can be done with a separate device and two cables, or using a cable wired to do this. If devices require Carrier Detect, it can be simulated by connecting DSR and DCD internally in the connector, thus obtaining CD from the remote DTR signal. One feature of the Yost standard is that a null modem cable is a "
rollover cable Rollover cable (also known as a Yost cable, Cisco cable, or a Console cable) is a type of null-modem cable that is used to connect a computer terminal to a router's console port. This cable is typically flat (and has a light blue color) to help ...
" that just reverses pins 1 through 8 on one end to 8 through 1 on the other end.


No hardware handshaking

The simplest type of serial cable has no hardware handshaking. This cable has only the data and signal ground wires connected. All of the other pins have no connection. With this type of cable flow control has to be implemented in the software. The use of this cable is restricted to data-traffic only on its cross-connected Rx and Tx lines. This cable can also be used in devices that do not need or make use of modem control signals.


Loopback handshaking

Because of the compatibility issues and potential problems with a simple null modem cable, a solution was developed to trick the software into thinking there was handshaking available. However, the cable pin out merely loops back, and does not physically support the hardware flow control. This cable could be used with more software but it had no actual enhancements over its predecessor. The software would work thinking it had hardware flow control but could suddenly stop when higher speeds were reached and with no identifiable reason.


Partial handshaking

In this cable the flow control lines are still looped back to the device. However, they are done so in a way that still permits ''Request To Send'' (RTS) and ''Clear To Send'' (CTS) flow control but has no actual functionality. The only way the flow control signal would reach the other device is if the opposite device checked for a ''Carrier Detect'' (CD) signal (at pin 1 on a DE-9 cable and pin 8 on a DB-25 cable). As a result, only specially designed software could make use of this partial handshaking. Software flow control still worked with this cable.


Full handshaking

This cable is incompatible with the previous types of cables' hardware flow control, due to a crossing of its RTS/CTS pins. With suitable software, the cable is capable of much higher speeds than its predecessors. It also supports software flow control.


Virtual null modem

A virtual null modem is a communication method to connect two
computer applications A computer is a machine that can be programmed to carry out sequences of arithmetic or logical operations (computation) automatically. Modern digital electronic computers can perform generic sets of operations known as programs. These progra ...
directly using a virtual serial port. Unlike a null modem cable, a virtual null modem is a
software Software is a set of computer programs and associated documentation and data. This is in contrast to hardware, from which the system is built and which actually performs the work. At the lowest programming level, executable code consists ...
solution which emulates a hardware null modem within the computer. All features of a hardware null modem are available in a virtual null modem as well. There are some advantages to this: * Higher transmission speed of serial data, limited only by computer performance and network speed * Virtual connections over local network or Internet, mitigating cable length restrictions * Virtually unlimited number of virtual connections * No need for a serial cable * The computer's physical
serial port In computing, a serial port is a serial communication interface through which information transfers in or out sequentially one bit at a time. This is in contrast to a parallel port, which communicates multiple bits simultaneously in parallel. ...
s remain free For instance,
DOSBox DOSBox is a free and open-source emulator which runs software for MS-DOS compatible disk operating systems—primarily video games. It was first released in 2002, when DOS technology was becoming obsolete. Its adoption for running DOS games i ...
has allowed older
DOS DOS is shorthand for the MS-DOS and IBM PC DOS family of operating systems. DOS may also refer to: Computing * Data over signalling (DoS), multiplexing data onto a signalling channel * Denial-of-service attack (DoS), an attack on a communicat ...
games to use virtual null modems. Another common example consists of Unix
pseudoterminal In some operating systems, including Unix and Linux, a pseudoterminal, pseudotty, or PTY is a pair of pseudo-device endpoints (files) which establish asynchronous, bidirectional communication ( IPC) channel (with two ports) between two or more pr ...
s (pty) which present a standard tty interface to user applications, including virtual serial controls. Two such ptys may easily be linked together by an application to form a virtual null modem communication path.


See also

*
Crossover cable A crossover cable connects two devices of the same type, for example DTE-DTE or DCE-DCE, usually connected asymmetrically (DTE-DCE), by a modified cable called a crosslink. Such a distinction between devices was introduced by IBM. The cross ...
*
Debugging In computer programming and software development, debugging is the process of finding and resolving '' bugs'' (defects or problems that prevent correct operation) within computer programs, software, or systems. Debugging tactics can involve in ...
*
Direct cable connection Direct Cable Connection (DCC) is a feature of Microsoft Windows that allows a computer to transfer and share files (or connected printers) with another computer, via a connection using either the serial port, parallel port or the infrared port ...
*
LapLink cable A Laplink Cable, also known as ''null-printer'' cable, allows the connection of two computers via the parallel port to establish a direct cable connection. The cable was introduced in 1983 with the Laplink software package, from Traveling Software ...
*
Rollover cable Rollover cable (also known as a Yost cable, Cisco cable, or a Console cable) is a type of null-modem cable that is used to connect a computer terminal to a router's console port. This cable is typically flat (and has a light blue color) to help ...
*
Serial Line Internet Protocol The Serial Line Internet Protocol (SLIP) is an encapsulation of the Internet Protocol designed to work over serial ports and router connections. It is documented in . On personal computers, SLIP has largely been replaced by the Point-to-Point ...


References


External links

*{{Commons category-inline, Null modems Modems Multiplayer null modem games Out-of-band management fr:Modem#Modem nul